package com.lslx.ln.sample.annotation.provider;

import org.apache.dubbo.config.RegistryConfig;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * <pre>
 *  ProviderConfiguration
 * </pre>
 *
 * @Author zhangj
 * @Date 2022/6/27 11:30
 */
@Configuration
@EnableDubbo(scanBasePackages = "com.lslx.ln.sample.annotation.provider")
@PropertySource("classpath:/spring/dubbo-provider.properties")
public class ProviderConfiguration {

    @Bean
    public RegistryConfig registryConfig() {
        RegistryConfig registryConfig = new RegistryConfig();
        registryConfig.setAddress("zookeeper://localhost:2181");
        return registryConfig;
    }


}
